package nxu.it.model;

public class Todo {
    private static  int count;
    protected Integer id;
    protected String content;
    protected Boolean complete=false;
    public Todo(String content, Boolean complete) {
        this(content);
        this.complete = complete;
    }
    public Todo(String content){
        this.id=++count;
        this.content=content;
    }

    public Todo() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Boolean getComplete() {
        return complete;
    }

    public void setComplete(Boolean complete) {
        this.complete = complete;
    }

    @Override
    public String toString() {
        return "Todo{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", complete=" + complete +
                '}';
    }

    public void setCompleted(boolean completed) {
        this.complete = completed;
    }
}
